//
//  EDSCacheManager.h
//  DriveSchoolCoach
//
//  Created by TangBin on 2019/8/13.
//  Copyright © 2019 TangBin. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

/**
 缓存管理
 */
@interface EDSCacheManager : NSObject


+ (instancetype)shareCache;

/**
 根据key存储object
 
 @param object 存储内容
 @param key 存储key
 */
- (void)storeObject:(id<NSCoding>)object forKey:(NSString *)key;

/**
 根据key来读取内容
 
 @param key 要读取内容的key
 @return 内容
 */
- (id)objectForKey:(NSString *)key;

/**
 根据key来移除内容
 
 @param key 需移除内容的key
 */
- (void)removeStoreObjectForKey:(NSString *)key;

- (void)clearCache;

/**
 读取缓存大小
 
 @return 返回缓存大小 单位：M
 */
- (NSString *)readCacheSize;

/**
 清除缓存
 */
- (void)cleanCacheSize;
@end

NS_ASSUME_NONNULL_END
